# 这个是我自己写的demo,乱写的,看不懂不要紧

import math

# math.pow()
aa = 1 - 2j
a = 1 + 2j
# print(math.sqrt(-4))
print(type(aa))
print(a * aa)
print(type(a * aa))
print(aa.real)
print(aa.imag)

# # 2.使用format()
# print("{0}{1}".format("王二狗", 18))
# print("{1}{0}{1}".format("王二狗", 18))
# print("{2}{0}{1}".format("李小花", 17, 88.8))
# print("{}{}".format("王二狗", 18))
# print("{name}{age}{name}".format(name="王二狗", age=18))

print(1 << 2)
print(3 & 7)
# 3.使用if语句完成：给定月份，输出该月属于哪个季节。3,4,5 春季 6,7,8 夏季  9,10,11 秋季 12, 1, 2 冬季

# a = 3
# while True:
#     a = input('请输入你要查询的月份:1-12')
#     a = int(a)
#     if 3 <= a <= 5:
#         print('这是春天')
#     elif a in [6, 7, 8]:
#         print('这是夏天')
#     elif a == 9 or a == 10 or a == 11:
#         print('这是秋天')
#     elif a in [12, 1, 2]:
#         print('这是冬天')
#     elif a == 100:
#         print('game over')
#         break
#     else:
#         print('你逗我呐?')


i = 1
while i < 6:
    print('*' * i)
    i += 1

i = 5
while i > 0:
    print('*' * i)
    i -= 1
i = 5
while i > 0:
    print('*' * 5)
    i -= 1

i = 1
while i < 5:
    print(' ' * i, end='')
    print('*' * (5 - i))
    i += 1

i = 5
while i > 0:
    print(' ' * i, end='')
    print('*' * (5 - i))
    i -= 1

i = 5
while i > 0:
    print(' ' * i, end='')
    print('*' * (5 - i))
    i -= 1